package cn.iocoder.yudao.framework.region.enums;

import cn.iocoder.yudao.framework.business.basic.enums.EnumValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * <pre>
 * OOoO0OOoO0OOOooo0oOOOO0OOOOO0oooOO0ooOOO0Ooooo0OOOOo0ooooO0OOooo0Ooooo0OOOOO
 *  区域数据集枚举
 * OOoO0OOoO0OOOooo0oOOOO0OOOOO0oooOO0ooOOO0Ooooo0OOOOo0ooooO0OOooo0Ooooo0OOOOO
 * </pre>
 *
 * @author 山野羡民（1032694760@qq.com）
 * @since 2025/02/28
 */
@Getter
@AllArgsConstructor
public enum RegionDataSet implements EnumValuable {

    ONLY_LATEST(1, "只保持最新版本数据", "https://gitee.com/xiangyuecn/AreaCity-JsSpider-StatsGov"),
    MERGE_HISTORY(2, "合并历年变更版本", "https://gitee.com/li_yu_jiang/ChinaAddressCrawler"),
    ;

    private final Integer value;
    private final String name;
    private final String url;

    public static RegionDataSet valueOf(Integer value) {
        for (RegionDataSet type : values()) {
            if (type.getValue().equals(value)) {
                return type;
            }
        }
        return MERGE_HISTORY;
    }

}
